<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>绩效考核  <{$smarty.const.WEB_NAME}></title>
	<link rel="stylesheet" type="text/css" href="./skin/default/style.css" />
	<script type="text/javascript" src="./skin/default/comm.js"></script> 
	<script type="text/javascript" src="./skin/default/calendar.js"></script>
</HEAD>

<BODY>
	<div style="font-size:13px;" class="headerTip"> 
	<ul>
		<li><a href="?q=kpiManage/skillKpi">技能等级考核</a></li>
		<{if $smarty.session.type == 1}>
		<li><a href="?q=kpiManage/skillTempl">技能等级模板</a></li>
		<{/if}>
		<li><a href="?q=kpiManage/skillTemplView">技能等级考核标准对照表</a></li>
	</ul>
	</div>
	
	<table>
		<tr>
			<th align="center">
				<{if $userId > 0}>
					<{$year}>年<{$month}>月技能等级考核----<{$name}>,&nbsp&nbsp考核类型----
					<{if $kpiType == 1}>
					开发
					<{elseif $kpiType == 2}>
					测试
					<{elseif $kpiType == 3}>
					集成
					<{else}>
					未知
					<{/if}>
				<{/if}>
			</th>
		</tr>
	</table>
	
<table width="100%">
 <tr>
 	<td valign="top" width="100"  >
	   <div class="leftUserList" id="leftUserList">
		 <span class="tit">考核人员</span>
		 <ol>
		 	<{section name=i loop=$user_list}>
			<li><a href="?q=kpiManage/skillKpi&userId=<{$user_list[i].id}>&year=<{$year}>&month=<{$month}>"><{$user_list[i].name}></a></li>
			<{/section}>
		 </ol>
	   </div>
	</td>
	<td valign="top">
	<{if $userId <= 0}>
	<div align="center" >
 		<font size="+1"><B>技能等级考核说明</B></font>
	</div>
	<div style="font-size:16px; background:#C0C0C0">
		说明：
		<br>&nbsp;&nbsp;&nbsp;&nbsp;1、优秀率=优秀/总项目，良好率=良/总项目，中等率=中/总项目，及格率=及格/总项目，差等率=差等/总项目。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;2、等级划分标准：
		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第1级划分：优96-100分，良80-96，中60-80，及格40-60，差40以下。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第2级划分：优106-110分，良90-106，中70-90，及格44-70，差44以下。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第3级划分：优116-120分，良96-116，中72-96，及格48-72，差48以下。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第4级划分：优125-130分，良105-125，中78-105，及格52-78，差52以下。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第5级划分：优135-140分，良112-135，中84-112，及格56-84，差56以下。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;3、晋升要求达到优秀级别，且中等率及以下累加不能大于或等于10%。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;4、晋升申请：连续三个月综合得分为优者可提交晋升申请，经评委会审核确认是否达到晋升条件和更高级别素质，通过后，公司依照技术考核技能要求进行个人考核，连续三个月考核分达到晋升要求分时可以申请通过。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;5、降级：考核出现1次差或连续2次考核出现1次中1次及格的，由评委会按实际情况进行讨论后决定是否进行降级处理。
		<br>&nbsp;&nbsp;&nbsp;&nbsp;6、评委会可以按实际技能要求进行技术标准调整。
	</div>
	<{else}>
	<form method="post" id="queryId" onsubmit="return OnCheck()" action="?q=kpiManage/">
	<table border="1" width="100%"  cellspacing="0" cellpadding="0" bordercolor="#cfcfcd" class="tableList tip_bug">
		<input type="hidden" name="kpiType" value="<{$kpiType}>">
		<input type="hidden" name="level" value="<{$level}>">
		<input type="hidden" name="coefficient" value="<{$coefficient}>">
		<tr>
			<th>编号</th>
			<th>考核类别</th>
			<th>考核等级</th>
			<th width="50%">指标</th>
			<th>优(10)</th>
			<th>良(8)</th>
			<th>中(6)</th>
			<th>及格(4)</th>
			<th>差(1)</th>
			<th>得分</th>
			<th>等级系数</th>
			<th>评定分</th>
		</tr>
		<{section name=i loop=$list}>
		<tr>
			<input type="hidden" name="index_<{$list[i].index}>" value="<{$list[i].index}>">
			<td align="center"><{$list[i].index}></td>
			<td align="center"><{$list[i].caption}></td>
			<td align="center"><{$list[i].level}></td>
			<td><{$list[i].content}></td>
			<td align="center">
				<input type="Radio" name="rating_<{$list[i].index}>" value="1" <{if $list[i].rating==1}>checked<{/if}>>
			</td>
			<td align="center">
				<input type="Radio" name="rating_<{$list[i].index}>" value="2" <{if $list[i].rating==2}>checked<{/if}>>
			</td>
			<td align="center">
				<input type="Radio" name="rating_<{$list[i].index}>" value="3" <{if $list[i].rating==3}>checked<{/if}>>
			</td>
			<td align="center">
				<input type="Radio" name="rating_<{$list[i].index}>" value="4" <{if $list[i].rating==4}>checked<{/if}>>
			</td>
			<td align="center">
				<input type="Radio" name="rating_<{$list[i].index}>" value="5" <{if $list[i].rating==5}>checked<{/if}>>
			</td>
			<td align="center"><{$list[i].score}></td>
			<td align="center"><{$list[i].coefficient}></td>
			<td align="center"><{$list[i].finalScore}></td>
		</tr>
		<{/section}>
	</table>
	<table border="1" width="100%"  cellspacing="0" cellpadding="0" bordercolor="#cfcfcd" class="tableList tip_bug">
		<tr>
			<td align="center" width="10%">总计: <{$array.skillSum|string_format:"%.2f"}>分</td>
			<td align="center" width="10%">等级: 
				<{if $array.skillLevel == 1}>优秀
				<{elseif $array.skillLevel == 2}>良好
				<{elseif $array.skillLevel == 3}>中等
				<{elseif $array.skillLevel == 4}>及格
				<{elseif $array.skillLevel == 5}>差等
				<{else}>未知
				<{/if}>
			</td>
			<td>优秀率=<{$array.rating_1}>%, 良好率=<{$array.rating_2}>%, 中等率=<{$array.rating_3}>%, 及格率=<{$array.rating_4}>%, 差等率=<{$array.rating_5}>%</td>
		</tr>
	</table>

	<table width="100%" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" class="tableList tip_bug">
		<tr>
		  <td align="center">考核者: <{$name}></td>
		  <{if $smarty.session.type == 1}>
		  <td align="center">
			<input type="submit" value="保存考核" class="sub_btn" onclick="javascript:OnSaveKpi(<{$userId}>)"/>
		  </td>
		  <td align="center">
			<input type="submit" value="保存评论" class="sub_btn" onclick="javascript:OnSaveComment(<{$userId}>)"/>
		  </td>
		  <{/if}>
		  <td align="center"> 
			<input type="text" width="4" id="yearId" name="year" value="<{$year}>" />
			<input type="text" width="2" id="monthId" name="month" value="<{$month}>" />
			<input type="submit" value="指定查询" class="sub_btn" onclick="javascript:OnCurrQuery(<{$userId}>)"/>
		  </td>
		  <td align="center">
			<input type="submit" value="查询上月" class="sub_btn" onclick="javascript:OnPrevQuery(<{$userId}>)"/>
			<input type="submit" value="查询下月" class="sub_btn" onclick="javascript:OnNextQuery(<{$userId}>)"/>
		  </td>
		</tr>
	</table>
	
	<table border="1" width="98%"  cellspacing="0" cellpadding="0" bordercolor="#cfcfcd">
		<input type="hidden" name="commentId" value="<{$skillcomment.id}>">
		<tr>
			<th width="8%">考核总评</th>
			<td>
				<{if $smarty.session.type == 1}>
				<textarea name="comment" id="commentId" style="width:950px; height:100px; border:none;padding:6px;overflow:auto;background: url(left_bg.png) repeat-x;"><{$skillcomment.comment}></textarea>
				<{else}>
				<{$skillcomment.comment}>
				<{/if}>
			</td>
		</tr>
			<th width="8%">改进意见</th>
			<td>
				<{if $smarty.session.type == 1}>
				<textarea name="advice" id="adviceId" style="width:950px; height:100px; border:none;padding:6px;overflow:auto;background: url(left_bg.png) repeat-x;"><{$skillcomment.advice}></textarea>
				<{else}>
				<{$skillcomment.advice}>
				<{/if}>
 			</td>
		</tr>
		<tr>
			<th width="8%">考核结果</th>					
			<td>
				<{if $smarty.session.type == 1}>
				<textarea name="result" id="resultId" style="width:950px; height:50px; border:none;padding:6px;overflow:auto;background: url(left_bg.png) repeat-x;"><{$skillcomment.result}></textarea>
				<{else}>
				<{$skillcomment.result}>
				<{/if}>
 			</td>
		</tr>
	</table>
	</form>
	<{/if}>
	</td>
 </tr>
</table>

	<script type="text/javascript">
		<!--
		function OnCheck() {
			var year = $('yearId').value;
			if( year < 2011 || year > 10000 ) {
				window.alert("非法的年份!");
				return false;
			}

			var month = $('monthId').value;
			if( month < 1 || month > 12 ) {
				window.alert("非法的月份!");
				return false;
			}

			return true;
		}
		
		// 保存考核
		function OnSaveKpi(userId) {
			$('queryId').action += "saveSkillKpi&userId=" + userId;
		}
		
		// 保存评论
		function OnSaveComment(userId) {
			$('queryId').action += "saveSkillComment&userId=" + userId;
		}
		
		// 指定查询
		function OnCurrQuery(userId) {
			$('queryId').action += "skillKpi&userId=" + userId;
		}
		
		// 查询上月
		function OnPrevQuery(userId) {
			$('queryId').action += "skillKpi&userId=" + userId;
			var year = $('yearId').value;
			var month = $('monthId').value;
			if( month == 1 ) {
				$('yearId').value = parseInt(year, 10) - 1;
				$('monthId').value = 12;
			} else {
				$('monthId').value = parseInt(month, 10) - 1;
			}
		}
		
		// 查询下月
		function OnNextQuery(userId) {
			$('queryId').action += "skillKpi&userId=" + userId;
			var year = $('yearId').value;
			var month = $('monthId').value;
			if( month == 12 ) {
				$('yearId').value = parseInt(year, 10) + 1;
				$('monthId').value = 1;
			} else {
				$('monthId').value = parseInt(month, 10) + 1;
			}
		}
		//-->
	</script>
</BODY>
</HTML>